1. Field of the Invention
The present invention relates to a numerical control device for a machine tool for machining a workpiece into a desired shape by a tool by moving at least one of the workpiece and the tool with the workpiece rotated around a predetermined axis.
2. Description of the Related Art
In a conventional electronic-cam-controlled machine tool, a driving control apparatus of a machine tool comprises a pulse encoder mounted on a rotatable member (reference axis), storage means for storing an ever-changing rotational position by reading a pulse signal from the pulse encoder, and another storage means for storing a command position data of a moving axis set for every unit rotational position of the rotatable member. Such driving control apparatus generates an ever-changing moving command data for the moving axis according to the stored rotation position data and the stored command position data. It also generates a command speed data for the moving axis in synchronous with the rotational speed of the rotatable member according to the generated moving command data and the stored rotation position data, thereby controlling the position of a tool based on the generated moving command data and the generated command speed data.
Conventionally, as described above, the headstock and the tool post are driven and the moving axis is positionally controlled on the basis of a single reference axis. This is disclosed in JP-A-2001-170843.
There are some secondary operations requiring the main spindle to stop: a milling operation to form a plane on a workpiece by moving and rotating a tool, a drilling operation through the workpiece in a direction perpendicular to the main spindle, and a drilling operation at an offset position of the axial center of the main spindle. If the main spindle is set as the reference axis, such operations are disabled under electronic-cam control since any reference signal is not generated from the stopped main spindle.
The electronic cam control utilizes command position data of a moving axis respectively set for every unit rotational position of the main spindle, thereby achieving higher accuracy with higher speed. If the main spindle is stopped, a pulse signal is not generated, therefore command position data of a moving axis respectively set for every unit rotational position of the main spindle is not obtained, then a moving command data is not generated.
It may be an alternative that another member but the main spindle is used to generate a reference signal while the main spindle is stopped. It might, however, raise a problem of machining accuracy with a tool such as a rotary tool when the spindle rotation is stopped.
Further, a solution includes a signal of another reference axis which is independent of rotation of the main spindle. It may be, for example, a communicator for generating a timing signal at given intervals from the start of electronic cam control. This alternative, however, also would raise a problem of machining accuracy and machining speed. If the electronic cam control is switched upon request so that the communicator is used to generate a signal of the reference axis in synchronous with the rotational angle of the main spindle, the change of the reference signal would also raise a risk of machining accuracy.